<html>
<head>
    <title>CORS Test</title>
    <script src="jquery-2.1.3.min.js"></script>
    <script>
        $(function () {
            var stdout = $('textarea');
            stdout.text('ready...');

            $('button').click(function () {
                var target = $('input').val(),
                    verb = $(this).text();

                $.ajax({
                    url: target,
                    method: verb,
                    success: function (data) {
                        stdout.text(JSON.stringify(data));
                    },
                    error: function () {
                        stdout.text('fail');
                    },
                    xhrFields: {
                        withCredentials: true
                    }
                });
            });
        })
    </script>
</head>
<body>
    <input type="text" value="http://10.58.77.124:5052" style="width: 500px" />
    <br />
    <textarea disabled style="width: 500px; height: 300px"></textarea>
    <br />
    <button>GET</button>
    <button>POST</button>
    <button>PUT</button>
    <button>PATCH</button>
    <button>DELETE</button>
</body>
</html>